package cn.zwx.order.req;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @description: 扣减库存请求参数
 * @projectName:rocket-mq-example
 * @see:cn.zwx.order.req
 * @author:zhangwenxue
 * @createTime:2020/10/15 12:07
 * @version:1.0
 */
@Data
public class DeductionRepertoryReq {

    /**
     * @description 商品id
     **/
    @NotBlank(message = "商品id不能为空")
    private String goodsId;

    /**
     * @description 库存数量
     **/
    @NotNull(message = "商品库存数量不能空")
    @Min(value = 0,message = "商品信息大于0")
    private Integer goodsNum;
}
